home *** CD-ROM | disk | FTP | other *** search
/ Windows 6-Pak - Disc 1 / Windows 6-Pak (InfoMagic) (Disc 1) (1999).ISO / Web-Browsers / IE4SHLNT.CAB / folder.htt < prev    next >
Text File  |  1998-05-08  |  12KB  |  356 lines

  1. <!-- 
  2.  * This file was automatically generated by Microsoft Internet Explorer 4.0 
  3.  * using the file %THISDIRPATH%\folder.htt (if customized) or
  4.  * %TEMPLATEDIR%\folder.htt (if not customized).
  5.  -->
  6.  
  7. <html>
  8.     <style>
  9.         body        {font: 8pt/10pt verdana; margin: 0}
  10.         #Banner        {position: absolute; width: 100%; height: 88px; background: URL(res://webvw.dll/folder.gif) no-repeat top left}
  11.         #MiniBanner    {position: absolute; width: 100%; height: 32px; background: window}
  12.         #Icon        {position: absolute; left: 11px; top: 12px; width: 64px; height: 64px}
  13.         #FileList    {position: absolute; left: 30%; top: 88px; width: 1px; height: 1px}
  14.         #Media        {margin-left: 20px; margin-top: 10px}
  15.         #Panel        {position: absolute; top: 88px; width: 30%; background: window; overflow: auto}
  16.         #PieChart    {width: 100px; height: 50px; margin-top: 10px}
  17.         #Thumbnail    {width: 160px; height: 160px; margin-top: 0px}
  18.         #Status        {margin-left: 20px}
  19.         p        {margin-left: 20px; margin-right: 8px}
  20.         p.Title        {font: 16pt/16pt verdana; font-weight: bold; color: #0099FF}
  21.         p.Warning    {font-weight: bold; color: red}
  22.         p.Links        {margin-top: 4px}
  23.         a:link        {color: #FF6633}
  24.         a:visited    {color: #0099FF}
  25.         a:active     {color: black}
  26.     </style>
  27.  
  28.     <head>
  29.         <!-- allow references to any resources you might add to the folder -->
  30.         <!-- (a "webbot" is a special wrapper for FrontPage compatibility) -->
  31.         <!-- webbot bot="HTMLMarkup" tag="base" startspan -->
  32.         <base href="%THISDIRPATH%\">
  33.         <!-- webbot bot="HTMLMarkup" endspan -->
  34.  
  35.         <script language="JavaScript">
  36.             var L_Intro_Text    = "Select an icon to view its description.";
  37.             var L_Multiple_Text    = " objects selected.";
  38.             var L_Size_Text        = "Size: ";
  39.             var L_FileSize_Text    = "Total File Size: ";
  40.             var L_Delimiter_Text    = ",";
  41.             var L_Bytes_Text    = " bytes";
  42.             var L_Attributes_Text    = "Attributes";
  43.             var L_Codes_Text    = "RHSACE";
  44.             var L_ReadOnly_Text     = "Read-only";
  45.             var L_Hidden_Text    = "Hidden";
  46.             var L_System_Text    = "System";
  47.             var L_Archive_Text    = "Archive";
  48.             var L_Compressed_Text    = "Compressed";
  49.             var L_Encrypted_Text    = "Encrypted";
  50.             var L_NoAttributes_Text = "(none set)";
  51.             var timer        = 0;
  52.             var wantMedia        = false; // cool, but may hinder media file manipulation
  53.  
  54.             function FixSize() {
  55.                 // this function handles fixed panel sizing and collapsing when the window resizes
  56.                 var hideTop    = 200;
  57.                 var hideLeft    = 400;
  58.                 var miniHeight    = 32;
  59.                 var ch        = document.body.clientHeight;
  60.                 var cw        = document.body.clientWidth;
  61.  
  62.                 if (hideTop > ch) {
  63.                     document.all.Banner.style.visibility = "hidden";
  64.                     document.all.MiniBanner.style.visibility = "visible";
  65.                     document.all.FileList.style.top = miniHeight;
  66.                     document.all.Panel.style.top = miniHeight;
  67.                 } else {
  68.                     document.all.Banner.style.visibility = "visible";
  69.                     document.all.MiniBanner.style.visibility = "hidden";
  70.                     document.all.FileList.style.top = (document.all.Banner.offsetHeight - 32) + "px";
  71.                     document.all.Panel.style.top = (document.all.Banner.offsetHeight) + "px";
  72.                     document.all.Rule.style.width = (cw > 84 ? cw - 84 : 0) + "px";      
  73.                 }
  74.                 if (hideLeft > cw) {
  75.                     document.all.Panel.style.visibility = "hidden";
  76.                     document.all.FileList.style.pixelLeft = 0;
  77.                     document.all.FileList.style.pixelTop = document.all.Panel.style.pixelTop;
  78.                 } else {
  79.                     document.all.Panel.style.visibility = "visible";
  80.                     document.all.FileList.style.pixelLeft = document.all.Panel.style.pixelWidth;
  81.                 }
  82.                 document.all.FileList.style.pixelWidth = cw - document.all.FileList.style.pixelLeft;
  83.                 document.all.FileList.style.pixelHeight = ch - document.all.FileList.style.pixelTop;
  84.                 document.all.Panel.style.pixelHeight = ch - document.all.Panel.style.pixelTop;
  85.             }
  86.  
  87.             function FormatNumber(n) {
  88.                 var t = "";
  89.                 var i, j = 0;
  90.                 for (i = n.length - 1; i >= 0; i--) {
  91.                     t = n.charAt(i) + t;
  92.                     if (i && ((++j % 3) == 0))
  93.                         t = L_Delimiter_Text + t;
  94.                 }
  95.                 return t;
  96.             }
  97.  
  98.             function Init() {
  99.                 // call our FixSize() function whenever the window gets resized
  100.                 window.onresize = FixSize;
  101.                 FixSize();
  102.                 Info.innerHTML = L_Intro_Text;
  103.             }
  104.         </script>
  105.  
  106.         <script language="JavaScript" for="FileList" event="SelectionChanged">
  107.             // this script updates the left info Panel when you select icons
  108.             var items    = FileList.FocusedItem;
  109.             var fldr    = FileList.Folder;
  110.             var name;
  111.             var data;
  112.             var text;
  113.             var title;
  114.             var size = 0;
  115.             var i;
  116.  
  117.             // cancel any pending status message
  118.             if (timer) {
  119.                 window.clearTimeout(timer);
  120.                 timer = 0;
  121.             }
  122.  
  123.             // erase any visible thumbnail since the selection changed
  124.             document.all.Thumbnail.style.display = "none";
  125.             document.all.Status.style.display = "none";
  126.  
  127.             // stop & destroy any media player
  128.             if (wantMedia)
  129.                 document.all.Media.innerHTML = "";
  130.  
  131.             data = FileList.SelectedItems().Count;
  132.             if (data == 0) {
  133.                 // nothing selected?
  134.                 Info.innerHTML = L_Intro_Text;
  135.                 return;
  136.             }
  137.             else if (data > 1) {
  138.                 // more than one item selected?
  139.                 text = data + L_Multiple_Text + "<br>";
  140.                 if (data <= 100) {
  141.                     for (i = 0; i < data; i++)
  142.                         size += FileList.SelectedItems().Item(i).Size;
  143.                     if (size)
  144.                         text += "<br>" + L_FileSize_Text + FormatNumber(size.toString()) + L_Bytes_Text + "<br>";
  145.                     if (data <= 16)
  146.                         for (i = 0; i < data; i++)
  147.                             text += "<br>" + FileList.SelectedItems().Item(i).Name;
  148.                 }
  149.                 Info.innerHTML = text;
  150.                 return;
  151.             }
  152.  
  153.             // name
  154.             name = fldr.GetDetailsOf(items, 0);
  155.             text = "<b>" + name + "</b>";
  156.  
  157.             // type
  158.             data = fldr.GetDetailsOf(items, 2);
  159.             if (data)
  160.                 text += "<br>" + data;
  161.  
  162.             // date
  163.             data = fldr.GetDetailsOf(items, 3);
  164.             if (data)
  165.                 text += "<br><br>" + fldr.GetDetailsOf(null, 3) + ":<br>" + data;
  166.  
  167.             // size?
  168.             size = FileList.SelectedItems().Item(0).Size;
  169.             if (size)
  170.                 if (size < 1000)
  171.                     text += "<br><br>" + L_Size_Text + size + L_Bytes_Text;
  172.                 else {
  173.                     data = fldr.GetDetailsOf(items, 1);
  174.                     if (data)
  175.                         text += "<br><br>" + fldr.GetDetailsOf(null, 1) + ": " + data;
  176.                     else
  177.                         text += "<br><br>" + L_Size_Text + FormatNumber(size.toString()) + L_Bytes_Text;
  178.                 }
  179.  
  180.             // extra details?
  181.             for (i = 4; i < 10; i++) {
  182.                 title = fldr.GetDetailsOf(null, i);
  183.                 if (!title)
  184.                     break;
  185.                 data = fldr.GetDetailsOf(items, i);
  186.                 if (title == L_Attributes_Text) {
  187.                     var code;
  188.                     var s = "";
  189.  
  190.                     text += "<br><br>" + title + ": ";
  191.                     for (i = 0; i < 6; i++) {
  192.                         code = L_Codes_Text.charAt(i);
  193.                         if (data.indexOf(code) > -1) {
  194.                             if (s)
  195.                                 s += ", ";
  196.                             if (i == 0)
  197.                                 s += L_ReadOnly_Text;
  198.                             else if (i == 1)
  199.                                 s += L_Hidden_Text;
  200.                             else if (i == 2)
  201.                                 s += L_System_Text;
  202.                             else if (i == 3)
  203.                                 s += L_Archive_Text;
  204.                             else if (i == 4)
  205.                                 s += L_Compressed_Text;
  206.                             else if (i == 5)
  207.                                 s += L_Encrypted_Text;
  208.                         }
  209.                     }
  210.                     if (!s)
  211.                         s = L_NoAttributes_Text;
  212.                     text += s;
  213.                 }
  214.                 else if (data)
  215.                     text += "<br><br>" + title + ":<br>" + data;
  216.             }
  217.  
  218.             // tip?
  219.             data = fldr.GetDetailsOf(items, -1);
  220.             if (data && data != name) {
  221.                 var start;
  222.                 var end;
  223.                 var theLink;
  224.                 var a;
  225.  
  226.                 // parse lines for Office files without breaking links below
  227.                 a = data.split("\n");
  228.                 data = a.join("<br>\n");
  229.  
  230.                 // look for embedded links
  231.                 text += "<br><br>";
  232.                 start = data.indexOf("http://");
  233.                 if (start < 0)
  234.                     start = data.indexOf("file://");
  235.                 if (start < 0)
  236.                     text += data;
  237.                 else {
  238.                     end = data.indexOf(" ", start);
  239.                     if (end < 0)
  240.                         end = data.length;
  241.                     if (start > 0)
  242.                         text += data.substring(0, start - 1);
  243.                     theLink = data.substring(start, end);
  244.                     text += theLink.link(theLink);
  245.                     if (end < data.length)
  246.                         text += data.substring(end + 1, data.length);
  247.                 }
  248.             }
  249.  
  250.             // replace Info with the new text
  251.             Info.innerHTML = text;
  252.  
  253.             if (wantMedia) {
  254.                 // show media preview or thumbnail based on file extension
  255.                 var ext = name.substring(name.lastIndexOf(".") + 1, name.length);
  256.                 ext = ext.toLowerCase();        
  257.                 if (ext == 'avi' || ext == 'mov' || ext == 'mpe' || ext == 'mpeg' || ext == 'mpg') {
  258.                     // show a movie player
  259.                     document.all.Media.innerHTML = '<object id="Player" style="width: 160px; height: 148px" classid=clsid:05589FA1-C356-11CE-BF01-00AA0055595A><param name="FileName" value="' + items.Path + '"><param name=ShowDisplay value=0><param name=BorderStyle value=0></object>'
  260.                     return;
  261.                 } else if (ext == 'aif' || ext == 'aifc' || ext == 'aiff' || ext == 'au' || ext == 'mid' || ext == 'rmi' || ext == 'snd' || ext == 'wav') {
  262.                     // show a sound player
  263.                     document.all.Media.innerHTML = '<object id="Player" style="width: 160px; height: 28px" classid=clsid:05589FA1-C356-11CE-BF01-00AA0055595A><param name="FileName" value="' + items.Path + '"><param name=ShowDisplay value=0></object>'
  264.                     return;
  265.                 }
  266.             }
  267.  
  268.             // try to generate a new thumbnail asynchronously, and delay the status message one second
  269.             if (Thumbnail.displayFile(items.Path))
  270.                 timer = window.setTimeout('document.all.Status.style.display = ""', 1000);
  271.         </script>
  272.  
  273.         <script language="JavaScript" for="Thumbnail" event="OnThumbnailReady">
  274.             // when a valid thumbnail has been generated, display it
  275.             window.clearTimeout(timer);
  276.             timer = 0;
  277.             document.all.Status.style.display = "none";
  278.             if (document.all.Thumbnail.haveThumbnail() && document.all.Media.innerHTML == "")
  279.                 document.all.Thumbnail.style.display = "";
  280.         </script>
  281.  
  282.     </head>
  283.  
  284.     <body scroll=no onload="Init()">
  285.  
  286.         <!-- start normal banner -->
  287.         <div id="Banner" style="visibility: hidden">
  288.             <!-- using a table with nowrap to prevent word wrapping -->
  289.             <table><tr><td nowrap>
  290.                 <p class=Title style="margin-left: 104px; margin-top: 16px">
  291.                 <!--webbot bot="HTMLMarkup" startspan alt="<B><I>Web View Folder Title</I></B> " -->
  292.                 %THISDIRNAME%
  293.                 <!--webbot bot="HTMLMarkup" endspan -->
  294.             </td></tr></table>
  295.             <!-- this is more efficient than a long graphic, but we have to adjust it in FixSize() -->
  296.             <hr id="Rule" size=1px color=black style="position: absolute; top: 44px; left: 84px">
  297.             <!-- this is our awesome icon extractor -->
  298.             <object id=Icon classid="clsid:E5DF9D10-3B52-11D1-83E8-00A0C90DC849">
  299.                 <param name="scale" value=200>
  300.             </object>
  301.         </div>
  302.         <!-- end normal banner -->
  303.  
  304.         <!-- start mini banner -->
  305.         <div id="MiniBanner" style="visibility: hidden">
  306.             <!-- using a table with nowrap to prevent word wrapping -->
  307.             <table><tr><td nowrap>
  308.                 <p class=Title style="margin-left: 16px; margin-top: 4px">
  309.                 <!--webbot bot="HTMLMarkup" startspan alt="<B><I>Web View Folder Title</I></B> " -->
  310.                 %THISDIRNAME%
  311.                 <!--webbot bot="HTMLMarkup" endspan -->
  312.             </td></tr></table>
  313.         </div>
  314.         <!-- end mini banner -->
  315.  
  316.         <!-- start left info panel -->
  317.         <div id="Panel">
  318.             <p style="margin-top: 16px");
  319.             <span id="Info">
  320.             </span>
  321.  
  322.             <!-- HERE'S A GOOD PLACE TO ADD A FEW LINKS OF YOUR OWN -->
  323.             <!-- (examples commented out)
  324.             <p>
  325.             <a href="http://www.mylink1.com/">Custom Link 1</a>
  326.             <p class=Links>
  327.             <a href="http://www.mylink2.com/">Custom Link 2</a>
  328.             -->
  329.  
  330.             <p>
  331.             <!-- this is the thumbnail viewer control -->
  332.             <object id=Thumbnail classid="clsid:1D2B4F40-1F10-11D1-9E88-00C04FDCAB92" style="display: none">
  333.             </object>
  334.  
  335.             <!-- this is the status message that pops up during thumbnail generation -->
  336.             <div id="Status" style="display: none">
  337.                 Generating thumbnail...
  338.             </div>
  339.  
  340.             <!-- this contains the ActiveMovie control for later instantiation -->
  341.             <div id="Media">
  342.             </div>
  343.             
  344.         </div>
  345.         <!-- end left info panel -->
  346.  
  347.         <!-- this is the standard file list control -->
  348.         <!-- webbot bot="HTMLMarkup" startspan u-src="file:///C:\Program Files\Microsoft FrontPage Express\Data\FoldData.gif" -->
  349.         <object id="FileList" border=0 tabindex=1 classid="clsid:1820FED0-473E-11D0-A96C-00C04FD705A2"
  350.         </object>
  351.         <!-- webbot bot="HTMLMarkup" endspan -->
  352.  
  353.     </body>
  354. </html>
  355.  
  356.